All Questions
Tagged with executablepython
18 questions
1vote
1answer
209views
Temporary failure in name resolution in Python script running during boot or on shutdown
I wrote a Python script which sends any message via Telegram: #!/opt/anaconda3/bin/python import asyncio import telegram import os import sys async def main(): bot = telegram.Bot(os.environ["...
0votes
1answer
208views
How can I make a specific piece of code portable for running on different systems through a pipe?
Quite often, when I search a solution to a problem, I end up finding lines of code like the following: curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - ...
4votes
4answers
1kviews
I want to terminate a python script if it doesn’t output anything to the terminal in 2 min
Here's my current bash which is just a loop while true ; do python3 /Users/Name/Desktop/pythoncode.py done I want to terminate pythoncode.py if it doesn’t output anything to the terminal in 2 ...
2votes
1answer
5kviews
Fish: The file is not executable by this user
I made fish function in ~/.config/fish/functions/confgit.fish: function confgit /home/john/Projects/confgit $argv end But when I run this function it just says: fish: The file “/home/john/...
0votes
0answers
818views
Make Python3 script callable from everywhere without making it an executable
I've got a folder: /root/Desktop/commands/ This folder contains many Python scripts that should be callable from anywhere from the terminal. How can I make it, that I say once, that all scripts in ...
1vote
1answer
3kviews
How to create wrapper script for python so that sys.executable becomes equal to name of this script?
I need to run Python interpreter with custom parameters and custom environment. Let's say I create a bash script which exports required variables and calls /usr/bin/python3 with required parameters. ...
1vote
2answers
334views
Where to store proprietary code and executable scripts? [closed]
I have Python code that is run using a bash script. I want non-sudo users to be able to run it without making the Python code readable. What is the recommended pattern? Two ways I considered: Put ...
1vote
1answer
96views
Is there a way to restore an uninstalled executable from bin?
I tried upgrading pip3 using su -c 'pip3 install' --upgrade pip' because I got errors and it failed when trying to upgrade it as a normal user. This removed the pre-installed pip from /usr/bin and ...
0votes
1answer
626views
Run python script without declare it interpreter
I have such a program to check methods of data from the command line: me at me in ~/Desktop/Coding/codes $ cat check_methods.py #! /usr/bin/env python from sys import argv methods = dir(eval(argv[1]))...
3votes
1answer
2kviews
Running python script on ubuntu machine using ./myscript.py
I am running a python script named myscript.py on ubuntu machine. I usually use python command to run python scripts as below. python main.py Recently, I downloaded a python script from a Github ...
0votes
1answer
1kviews
Run a file automatically in terminal when you click on it
I'm using Linux debian 4.9.0-kali4-amd64 #1 SMP Debian 4.9.30-1kali1 (2017-06-06) x86_64 GNU/Linux and want to make /home/pantheon/Desktop/pycrust-20170611-2151.sh run in terminal when I klick on it. ...
4votes
2answers
426views
direct execution of python scripts
I have noticed that sometimes python scripts are not being started directly, ie /foo/bar.py, but rather from a shell script, which does nothing else than /usr/bin/python -O /foo/bar.py $@ One such ...
2votes
0answers
540views
Why won't my python scripts run without the python command when moved from Windows to Linux? [duplicate]
I have some Python files that I wrote on my Windows PC and then sent over to a Linux machine using pscp. They work as intended on Windows, but when I try to execute them on the Linux machine, I always ...
12votes
1answer
67kviews
No such file or directory but I can see it!
I'm trying to run a python script, on a headless Raspberry PI using winSCP and get the following error message: Command '"./areadetect_movie_21.py"' failed with return code 127 and error message /usr/...
7votes
6answers
46kviews
Running python script from Linux Terminal
I have downloaded this script named, pyAES.py and put it in a folder name codes, inside a Desktop directory of my Linux, According to this example, http://brandon.sternefamily.net/2007/06/aes-...